%Creates one big cluster

C = create_cluster([0,0]', [10, 10]', 1000);
scatter(C(1,:), C(2,:), 'Marker', '.');
axis equal;

clusters_num = 5;

%K-means
for k=2:clusters_num
    figure;
    class = kmeans(C', k);
    scatter(C(1,:), C(2,:),[], class', 'Marker', '.');
    axis equal;
    t = sprintf('K-Means results. K=%d', k);
    title(t);
end

%Hierarchical FN
for k=2:clusters_num
    figure;
    class = clusterdata(C', 'maxclust', k, 'linkage', 'complete');
    scatter(C(1,:), C(2,:),[], class', 'Marker', '.');
    axis equal;
    t = sprintf('Hierarchical FN results. K=%d', k);
    title(t);
end


%Hierarchical NN
for k=2:clusters_num
    figure;
    class = clusterdata(C', 'maxclust', k, 'linkage', 'single');
    scatter(C(1,:), C(2,:),[], class', 'Marker', '.');
    axis equal;
    t = sprintf('Hierarchical NN results. K=%d', k);
    title(t);
end
